home *** CD-ROM | disk | FTP | other *** search
- How to use PHP with Surfboard
- Basically, this is done by compiling PHP as a CGI script, putting
- on a wrapper (I haven't figured out how to make php NPH), and adding the
- appropriate entries to the MIME configuration file for .php files.
-
- (1) Compiling PHP as a CGI script
- * Get the source from www.php.net
- * Just compile it ('make') - don't set any other options
- * Copy the resulting binary (called just 'php') to
- somewhere (here, I'll assume /usr/local/bin, but it
- could be anywhere).
-
- (2) Putting on the wrapper
- * A shell script like this should do the trick:
-
- #!/bin/sh
- echo "HTTP/1.1 200 OK"
- echo "Connection: close"
- /usr/local/bin/php $1
-
- Make sure to refer to the php binary with an ABSOLUTE
- path - the current directory will be that containing the
- script, not the interpreter.
-
- (3) Telling Surfboard what to do with .php files
- * Add something like the following to your MIME
- configuration file (/etc/surfboard/mime.conf unless you
- have specified something else in the main config file):
-
- php application/x-php /usr/local/bin/php-wrapper
- php3 application/x-php /usr/local/bin/php-wrapper
-
-
- Tradaa! One successful PHP installation.
-